package com.ecommerce.interceptor;


import org.jetbrains.annotations.NotNull;
import org.springframework.web.servlet.HandlerInterceptor;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

/**
 * 登录拦截器
 *
 * @author wang
 */
public class LoginInterceptor implements HandlerInterceptor {
//    @Override
//    public boolean preHandle(HttpServletRequest request, @NotNull HttpServletResponse response, @NotNull Object handler) throws Exception {
//        HttpSession session = request.getSession();
//        Object account = session.getAttribute("account");
//        if (account == null) {
//            response.sendRedirect("/doc.html");
//            return false;
//        }
//        return true;
//    }
}
